A certificate is a generated PDF recognising that a user has completed some unit of training.



To create a certificate enter the template into the editor which can include dynamic fields about the user and module. See below for details about the dynamic fields

You may optionally specify a background image. This is normally intended to be an image covering the whole A4 page and typically will contain the letterhead or banner, a footer, and probably additional content in between using a special font. Since special fonts cannot be represented in the templated code they need to be part of the background image.

Laying out your certificate

When designing your certificate you will usually want to have quite large fonts well spaced throughout the page. The simplest way to achieve this is by adding a table and putting your content into rows and possibly a single column. You might want to use centre align on the table.

Previewing

Since the template code uses information from a module its not possible to preview a certificate directly, it can only previewed for a particular module. To do this, go to the manage module page you want to preview the certificate for, ensure the certifcate has been added to the module and the module saved, and then click the preview button

Dynamic Fields

All dynamic fields use the following format: @{profile.formattedName}

The part before the dot (ie profile) is the source of the information (refered to as the object) and the part after the dot is the particular property to use

Available objects:

  • profile: is the user profile, containing information about the person who is receiving the certificate. When previewing the profle will be yours
  • parent: this refers to the module (ie the parent of the certificate). You can access properties of the module such as the title, learning time and brief description
  • formatter: this object has functions which let you access the date and format values

Common dynamic fields

There are many properties that can be accessed and in many different ways, but below are the most common usages

For a full list of properties for these objects see the Templating reference

Description Template code Notes
Full name of the user @{formatter.htmlEncode(profile.formattedName)} Puts together the user's first name and last name if they're available. Will use their nickname otherwise
Module title @{formatter.htmlEncode(parent.title)} The parent object is the parent of the certificate, which is the module. Here we're using its title property
User's organisation @{formatter.htmlEncode(userOrganisation.formattedName)} Only relevant if you're using business units. If so it will output the name of their organisation. The formatter.htmlEncode is necessary because the organisation's name could contain special characters which otherwise would break PDF generation.
User's organisation address @{formatter.htmlEncode(userOrganisation.address)} Display the address of the user's organisation
Current date @{formatter.formatDate(formatter.now)} Displays the current date, ie the date the certificate was generated

Ask a question, or offer an answer